package com.market.dao.jpa;

import org.springframework.stereotype.Repository;

import com.market.dao.ProductPriceDao;
import com.market.domain.ProductPrice;

@Repository("productPriceDao")
public class ProductPriceDaoJpa extends
		GenericDaoJpa<ProductPrice, Long> implements ProductPriceDao {

	public ProductPriceDaoJpa() {
		super(ProductPrice.class);
	}

	public void remove(ProductPrice object) {
		if (super.findById(object.getId()) == null) {
			log.debug(this.getClass() + " ProductPrice with id " + object.getId()
					+ " can not be found, can not be delete ");
		} else {
			super.removeById(object.getId());
			log.debug(this.getClass() + " ProductPrice with id " + object.getId()
					+ " is found, will be deleted");
		}
	}

}
